/********************************************************************************
 * Copyright (c)2016-2020, ShenZhen WanJiaAn Technology CO.,LTD.
 * All Rights Reserved.
 *
 * File Name     : av_type.h
 * Author        : joki.zhu
 * Date          : 2019-10-08
 *
 * Record        :
 * 1.Date        : 2019-10-08
 *   Author      : joki.zhu
 *   Modification: Created file
 ********************************************************************************/

#ifndef __AV_TYPE_H__
#define __AV_TYPE_H__

#ifdef __KERNEL__
#include <linux/types.h>
#else
#include <stdint.h>
#endif

#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* __cplusplus */

typedef enum {
    AV_FALSE = 0,
    AV_TRUE  = 1,
} AV_BOOL;

#ifndef NULL
    #define NULL                0L
#endif

#define AV_NULL                 0L
#define AV_SUCCESS              0
#define AV_FAILURE              (-1)

typedef signed char             AV_CHAR;
typedef short                   AV_SHORT;
typedef int                     AV_INT;
typedef long                    AV_LONG;

typedef signed char             AV_S8;
typedef short                   AV_S16;
typedef int                     AV_S32;
typedef long                    AV_SL;

typedef unsigned char           AV_U8;
typedef unsigned short          AV_U16;
typedef unsigned int            AV_U32;
typedef unsigned long           AV_UL;

#ifndef _M_IX86
    typedef unsigned long long  AV_U64;
    typedef long long           AV_LONGLONG;
    typedef unsigned long long  AV_S64;
#else
    typedef unsigned __int64    AV_U64;
    typedef __int64             AV_LONGLONG;
    typedef unsigned long long  AV_S64;
#endif

typedef float                   AV_FLOAT;
typedef double                  AV_DOUBLE;
typedef void                    AV_VOID;
typedef unsigned int            AV_HANDLE;
typedef AV_BOOL                 AV_BOOL;

//////////////////////////////////////////////////////////////////////////
typedef signed char             av_s8_t;
typedef short                   av_s16_t;
typedef int                     av_s32_t;
typedef long                    av_slong_t;

typedef unsigned char           av_u8_t;
typedef unsigned short          av_u16_t;
typedef unsigned int            av_u32_t;
typedef unsigned long           av_ulong_t;

#ifndef _M_IX86
    typedef unsigned long long  av_u64_t;
    typedef long long           av_s64_t;
#else
    typedef unsigned __int64    av_u64_t;
    typedef __int64             av_s64_t;
#endif

typedef float                   av_float_t;
typedef double                  av_double_t;
typedef void                    av_void_t;
typedef unsigned int            av_handle;
typedef AV_BOOL                 av_bool_t;
//////////////////////////////////////////////////////////////////////////

#ifdef __cplusplus

#if __cplusplus

}

#endif

#endif /* __cplusplus */



#endif /* __AV_TYPE_H__ */
